// 1.0 导入vue核心包
import Vue from 'vue';

// 2.0 导入App.vue的vue对象
import App from './App.vue';

import vueRouter from 'vue-router';
// 3.0.1 将vueRouter对象绑定到Vue对象上
Vue.use(vueRouter);

import home from './components/Home.vue';
import shopcar from './components/shopcar/car.vue';
import newslist from './components/news/newslist.vue';
import photolist from './components/photo/photolist.vue';
import goodslist from './components/goods/goodslist.vue';


var router1 = new vueRouter({
	linkActiveClass: 'mui-active',  //改变路由激活时的class名称
	routes: [
		{ path: '/home', component: home },
		{ path: '/shopcar', component: shopcar},
		{path:'news/newslist',component:newslist},
		{path:'photo/photolist',component:photolist},
		{path:'goods/goodslist',component:goodslist},

	]
});

import 'mint-ui/lib/style.min.css';
// 导入mint-ui组件对象
import mintui from 'mint-ui';
// 在Vue中全局使用mintui
Vue.use(mintui);
// 3.0 利用Vue对象进行解析渲染

// 5.0 注册mui的css样式
import '../statics/mui/css/mui.css';

// 6.0 导入一个当前系统的全局基本样式
import '../statics/css/site.css';

import vueResource from 'vue-resource';
Vue.use(vueResource);

Vue.filter('datafmt',function(input,fmtstring){
	return m
})
new Vue({
	el:'#app',
	router:router1,
	// render:function(create){create(App)} //es5的写法
	render:c=>c(App)  // es6的函数写法 =>：goes to
});